//创建一个路由器，暴露出去
import { createRouter, createWebHistory } from 'vue-router'
import Home from '../components/Home.vue'
import History from '../components/History.vue'
import Person_center from "../components/personal-center.vue"
import VideoShow from "../components/VideoShow.vue"
import Search from '@/components/Search.vue'
import Anime from '@/components/Anime.vue'
import Music from '@/components/Music.vue'
import Sports from '@/components/Sports.vue'
import Games from '@/components/Games.vue'
import Collect from '@/components/Collect.vue'

const router = createRouter({
    history: createWebHistory(),
    routes: [{
        path: '/',
        component: Home
    },
    {
        path: '/history',
        component: History
    },
    {
        path: '/personal-center',
        component: Person_center
    },
    {
        path: '/videoshow/:id',
        component: VideoShow
    },
    {
        path: '/search',
        component: Search
    },
    {
        path: '/anime',
        component: Anime
    },
    {
        path: '/music',
        component: Music
    },
    {
        path: '/sports',
        component: Sports
    },
    {
        path: '/games',
        component: Games
    },
    {
        path: '/collect',
        component: Collect
    },
    ],
})

export default router